package com.thor.palmmall.rest.workorder;

import java.util.Map;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import com.thor.commons.entity.BeanOperateInfo;
import com.thor.commons.exception.ThorServiceException;
import com.thor.commons.query.QueryResult;
import com.thor.palmmall.rest.common.AUserGroupLoadParam;

@Path("/work-order")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public interface AWorkOrderService {

  @POST
  @Path(value = "/create")
  String create(AWorkOrderBill bill, @QueryParam("") BeanOperateInfo operateInfo)
      throws ThorServiceException;

  @POST
  @Path(value = "/save")
  String save(AWorkOrderBill bill, @QueryParam("") BeanOperateInfo operateInfo)
      throws ThorServiceException;

  @GET
  @Path(value = "/queryOutgoingState")
  String[] queryOutgoingState() throws ThorServiceException;

  @POST
  @Path(value = "/{id}")
  AWorkOrderBill get(@PathParam("id") String id, AUserGroupLoadParam param)
      throws ThorServiceException;

  @POST
  @Path(value = "/query")
  QueryResult<AWorkOrderBill> query(AWorkOrderBillQueryParam param) throws ThorServiceException;

  @GET
  @Path(value = "/getAllTypes")
  Map<String, String> getAllTypes() throws ThorServiceException;

}
